﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace FANUC.DTO
{
    public class UnitMeasurementHistoryDtoInput
    {
        public string Part_Serial { get; set; }
    }

    public class UnitMeasurementHistoryOnePart_SeialDtoOutput
    {
        public string Part_Serial { get; set; }
        public List<string> SerialNumbers { get; set; }
        public int QualityGrade { get; set; }
        public decimal CurrentMax { get; set; }
        public decimal VoltageMax { get; set; }
        public List<decimal> Standard_Data_Voltage { get; set; }
        public List<decimal> Standard_Data_Current { get; set; }
        public List<int> Pass_Nos { get; set; }
        public List<OnePassQualityResultRowDtoOutput> Passes_QualityGrade { get; set; }
        public UnitMeasurementHistoryOnePassNoDtoOutput OnePassMeasurementRecord { get; set; }
    }

    public class OnePassQualityResultRowDtoOutput
    {
        public int Pass_No { get; set; }
        public int QualityGrade { get; set; }
    }

    public class UnitMeasurementHistoryOnePassNoDtoOutput
    {
        public string Part_Serial { get; set; }
        public string Part_Number { get; set; }
        public int Pass_No { get; set; }
        public decimal Para_Value1 { get; set; }

        public decimal Para_Value2 { get; set; }
        public decimal Para_Value3 { get; set; }

        public decimal Weave_Value1 { get; set; }
        public decimal Weave_Value2 { get; set; }

        public decimal Weave_Value3 { get; set; }

        public decimal Weave_Value4 { get; set; }

        public List<decimal> Data_Voltage { get; set; }

        public List<string> Voltage_TimePoint { get; set; }

        public List<decimal> Data_Current { get; set; }

        public List<string> Current_TimePoint { get; set; }

        public DateTime Start_Time { get; set; }

        public DateTime End_Time { get; set; }

        public DateTime Insert_Time { get; set; }

        public decimal Standard_Current_MaxLine { get { return decimal.Round(Standard_Current_USL + (Standard_Current_USL - Standard_Current_AVGLine) / 2, 2); } }
        public decimal Standard_Current_USL { get; set; }
        public decimal Standard_Current_AVGLine { get; set; }
        public decimal Standard_Current_LSL { get; set; }


        public decimal Standard_Voltage_MaxLine { get { return decimal.Round(Standard_Voltage_USL + (Standard_Voltage_USL - Standard_Voltage_AVGLine) / 2, 2); } }
        public decimal Standard_Voltage_USL { get; set; }
        public decimal Standard_Voltage_AVGLine { get; set; }
        public decimal Standard_Voltage_LSL { get; set; }

        public decimal Current_Real_Over_Percent { get; set; }
        public decimal Voltage_Real_Over_Percent { get; set; }
    }
}